﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI.HistoryUserDefAllocRateBListUIModel
{
	[Serializable]
	public partial class HistoryUserDefAllocRateBListUIModelModel : UIModel
	{
		#region Constructor
		public HistoryUserDefAllocRateBListUIModelModel() : base("HistoryUserDefAllocRateBListUIModel")
		{
			InitClass();
			this.SetResourceInfo("1232c5ff-5f98-45fe-ae94-e37e4b3c426d");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private HistoryUserDefAllocRateBListUIModelModel(bool isInit) : base("HistoryUserDefAllocRateBListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new HistoryUserDefAllocRateBListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private HistoryUserDefAllocRateView viewHistoryUserDefAllocRate;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public HistoryUserDefAllocRateView HistoryUserDefAllocRate
		{
			get { return (HistoryUserDefAllocRateView)this["HistoryUserDefAllocRate"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewHistoryUserDefAllocRate = new HistoryUserDefAllocRateView(this);
			this.viewHistoryUserDefAllocRate.SetResourceInfo("7f76094f-d136-43be-bf1a-1c8a721a5569");
			this.Views.Add(this.viewHistoryUserDefAllocRate);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class HistoryUserDefAllocRateView : UIView
	{
		#region Constructor
		public HistoryUserDefAllocRateView(IUIModel model) : base(model,"HistoryUserDefAllocRate","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.HistoryUserDefAllocRateBE.HistoryUserDefAllocRate", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private HistoryUserDefAllocRateView():base(null,"HistoryUserDefAllocRate","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.HistoryUserDefAllocRateBE.HistoryUserDefAllocRate", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new HistoryUserDefAllocRateView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}


		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","8d5fc6bf-75b9-4039-afee-abe26cb590a3");


		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new HistoryUserDefAllocRateRecord(builder);
		}
		#endregion

		#region new method
		public new HistoryUserDefAllocRateRecord FocusedRecord
		{
			get { return (HistoryUserDefAllocRateRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new HistoryUserDefAllocRateRecord AddNewUIRecord()
		{	
			return (HistoryUserDefAllocRateRecord)base.AddNewUIRecord();
		}
		public new HistoryUserDefAllocRateRecord NewUIRecord()
		{	
			return (HistoryUserDefAllocRateRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class HistoryUserDefAllocRateRecord : UIRecord
	{
		#region Constructor
		public HistoryUserDefAllocRateRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private HistoryUserDefAllocRateView uiviewHistoryUserDefAllocRate
		{
			get { return (HistoryUserDefAllocRateView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new HistoryUserDefAllocRateRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewHistoryUserDefAllocRate.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewHistoryUserDefAllocRate.FieldID);
			}
			set{
				this[this.uiviewHistoryUserDefAllocRate.FieldID] = value;
			}
		}
		#endregion
	}
	



}